<template>
	<view class="shift-base-info-wrap">
		<view class="base-info-header">
			基本信息
		</view>
		<view class="base-info-content" v-if="detail">
			<view class="content-wrap" v-for="(item, index) in labelValueList" :key="index">
				<view class="content-label">
					{{item.label}}：
				</view>
				<view class="content-value">
					{{detail[item.value] || '--'}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "ShiftBaseInfo",
		props: {
			detail: {
				type: Object,
				default: undefined,
			},
		},
		data() {
			return {
				labelValueList: [{
					label: '安全主办',
					value: 'handoverSafetyAndEnvironmentUserName'
				},{
					label: '综合主办',
					value: 'handoverSyntheticalUserName'
				},{
					label: '生产主办',
					value: 'handoverBuildUserName'
				},{
					label: '设备主办',
					value: 'handoverEquipmentUserName'
				},{
					label: '当班主操',
					value: 'mainOperatorUser'
				},{
					label: '当班巡检',
					value: 'iPQCUser'
				},{
					label: '其他参与人员',
					value: 'handoverOtherUserName'
				}]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.shift-base-info-wrap {
		.base-info-header {
			padding: 20rpx 0 20rpx 30rpx;
			font-size: 26rpx;
			color: #999999;
			line-height: 37rpx;
			background-color: #F5F5F5;
		}
		.base-info-content {
			background-color: #fff;
			padding-left: 30rpx;
			.content-wrap {
				display: flex;
				align-items: center;
				border-bottom: 1rpx solid #D5D7E3;
				padding: 24rpx 30rpx 24rpx 0;
				.content-label,.content-value {
					font-size: 28rpx;
					line-height: 40rpx;
				}
				
				.content-label {
					color: #333333;
					min-width: 140rpx;
				}
				.content-value {
					color: #666666;
				}
			}
		}
	}
</style>
